function getbxYXYSEDBccount(){

    //如果修改出版社，则清空明细的数据
    $("#yxysedb_A_AFORM input[qucln='XT_ID']").change(function(){
        $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").val(0);
        $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").next().val(0);

        $("#yxysedb_A_AFORM input[qucln=TRANSLATOR]").val("");
        $("#yxysedb_A_AFORM input[qucln=TRANSLATOR]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=TRANSLATOR]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=XT_AUTHOR]").val("");
        $("#yxysedb_A_AFORM input[qucln=XT_AUTHOR]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=XT_AUTHOR]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=PRODUCTMANAGER]").val("");
        $("#yxysedb_A_AFORM input[qucln=PRODUCTMANAGER]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=PRODUCTMANAGER]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").val("");
        $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=YINSHU]").val("");
        $("#yxysedb_A_AFORM input[qucln=YINSHU]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=YINSHU]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=PREPAID_BALANCE]").val("");
        $("#yxysedb_A_AFORM input[qucln=PREPAID_BALANCE]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=PREPAID_BALANCE]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=OCCUPANCY_AMOUNT]").val("");
        $("#yxysedb_A_AFORM input[qucln=OCCUPANCY_AMOUNT]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=OCCUPANCY_AMOUNT]").next().val("");

        $("#yxysedb_A_AFORM input[qucln=AMOUNT_USED]").val("");
        $("#yxysedb_A_AFORM input[qucln=AMOUNT_USED]").attr("chan", "T");
        $("#yxysedb_A_AFORM input[qucln=AMOUNT_USED]").next().val("");


    });



}



function getbxYINSHUccount() {
    var JIAFANG = $("#yxysedb_A_AFORM input[qucln='XT_ID']").val();
    var YINCI = $("#yxysedb_A_AFORM input[qucln='YINCI']").val();

    $.ajax({
        type: 'post',
        url: _m_url + 'fxa/getYINSHUsum',
        data: {
            'VENDOR_ID': JIAFANG,
            'YINCI':YINCI
        },
        success: function (data) {

                    $("#yxysedb_A_AFORM input[qucln=YINSHU]").val(
                        data);
                    $("#yxysedb_A_AFORM input[qucln=YINSHU]").attr(
                        "chan", "T");
                    $("#yxysedb_A_AFORM input[qucln=YINSHU]").next()
                        .val(data);

                    var YINSHU = $("#yxysedb_A_AFORM input[qucln='YINSHU']").val();
                    var XT_H_PRICE = $("#yxysedb_A_AFORM input[qucln='XT_H_PRICE']").val();
                    if (data!='' && data !=null) {

                        var rate = 0.01;
                        var productLevel = $("#yxysedb_A_AFORM input[qucln='PRODUCT_LEVEL']").val();
                        if ('1' == productLevel) {
                            rate = 0.01;
                        } else {
                            rate = 0.02;
                        }

                        var money = XT_H_PRICE * YINSHU * rate;

                        $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").val(
                            money);
                        $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").attr(
                            "chan", "T");
                        $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").next()
                            .val(money);

                        $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").val(
                            money);
                        $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").attr(
                            "chan", "T");
                        $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").next()
                            .val(money);
                    }
                }
    })


    }

function getAccountByProductLevel() {
    var rate = 0.01;
    var productLevel = $("#yxysedb_A_AFORM input[qucln='PRODUCT_LEVEL']").val();
    if ('1' == productLevel) {
        rate = 0.01;
    } else {
        rate = 0.02;
    }

    var YINSHU = $("#yxysedb_A_AFORM input[qucln='YINSHU']").val();
    var XT_H_PRICE = $("#yxysedb_A_AFORM input[qucln='XT_H_PRICE']").val();

    var money = XT_H_PRICE * YINSHU * rate;

    $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").val(
        money);
    $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").attr(
        "chan", "T");
    $("#yxysedb_A_AFORM input[qucln=YAPPLICATIONAMOUNT]").next()
        .val(money);

    $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").val(
        money);
    $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").attr(
        "chan", "T");
    $("#yxysedb_A_AFORM input[qucln=SAPPLICATIONAMOUNT]").next()
        .val(money);
}